package com.rush.manageepac.controller;
import com.rush.manageepac.entity.Map;
import com.rush.manageepac.service.intf.MapService;
import com.rush.manageepac.vo.PageBean;
import com.rush.manageepac.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/map/")
public class MapController {
    @Autowired
    private MapService service;

    //新增
    @RequestMapping("save.do")
    public R save(Map map) {
        return service.save(map);
    }

    //删除
    @RequestMapping("del.do")
    public R del(int id) {
        return service.delete(id);
    }

    //查询
    @RequestMapping("page.do")
    public PageBean page(String scope, int page, int limit) {

        return service.selectPage(scope, page, limit);
    }
    //修改
    @RequestMapping("update.do")
    public R update(Map map){
        return service.update(map);
    }

}
